<?php
defined('APP_DIR') or die("404 Not Found");

FLEA::loadFile('Tool_fckeditor_fckeditor.php');

function _ctlFckeditor($name, $attribs) {
	$opts = array('Width', 'Height', 'ToolbarSet', 'Value', 'BasePath');
	$default = array(
		'Width' => 620,
		'Height' => 500,
		'ToolbarSet' => 'Default',
		'BasePath' => ROOT.'/APP/tool/fckeditor/'
	);
    $data = FLEA_WebControls::extractAttribs($attribs, $opts);
	foreach ($opts as $v)
		$data[$v] = empty($data[$v]) ? $default[$v] : $data[$v];
	$fck = new FCKeditor($name, $data);
	return $fck->CreateHtml();
}
